Class Image

Summary

Fully Qualified Name: Laminas\Captcha\Image
Extends: AbstractWord

Description

Image-based captcha element

Generates image displaying random word

Methods

Name Description Defined By
__construct() Constructor Image
__get() Magic function returns the value of the requested property, if and only if it is the value or a message variable. AbstractValidator
__invoke() Invoke as command AbstractValidator
generate() Generate captcha Image
getDefaultTranslator() Get default translation object for all validate objects AbstractValidator
getDefaultTranslatorTextDomain() Get default translation text domain for all validate objects AbstractValidator
getDotNoiseLevel() Image
getExpiration() Get captcha expiration Image
getFont() Get font to use when generating captcha Image
getFontSize() Get font size Image
getGcFreq() Get garbage collection frequency Image
getHeight() Get captcha image height Image
getHelperName() Get helper name used to render captcha Image
getId() Retrieve captcha ID AbstractWord
getImgAlt() Image
getImgDir() Get captcha image directory Image
getImgUrl() Get captcha image base URL Image
getLineNoiseLevel() Image
getMessageLength() Returns the maximum allowed message length AbstractValidator
getMessageTemplates() Returns the message templates from the validator AbstractValidator
getMessageVariables() Returns an array of the names of variables that are used in constructing validation failure messages AbstractValidator
getMessages() Returns array of validation failure messages AbstractValidator
getName() Get name AbstractAdapter
getOption() Returns an option AbstractValidator
getOptions() Returns all available options AbstractValidator
getSession() Get session object AbstractWord
getSessionClass() Retrieve session class to utilize AbstractWord
getStartImage() Image
getSuffix() Get captcha image file suffix Image
getTimeout() Get session token timeout AbstractWord
getTranslator() Return translation object AbstractValidator
getTranslatorTextDomain() Return the translation text domain AbstractValidator
getUseNumbers() Numbers should be included in the pattern? AbstractWord
getWidth() Get captcha image width Image
getWord() Get captcha word AbstractWord
getWordlen() Retrieve word length to use when generating captcha AbstractWord
hasDefaultTranslator() Is there a default translation object set? AbstractValidator
hasTranslator() Does this validator have its own specific translator? AbstractValidator
isTranslatorEnabled() Is translation enabled? AbstractValidator
isValid() Validate the word AbstractWord
isValueObscured() Retrieve flag indicating whether or not value should be obfuscated in messages AbstractValidator
setDefaultTranslator() Set default translation object for all validate objects AbstractValidator
setDefaultTranslatorTextDomain() Set default translation text domain for all validate objects AbstractValidator
setDotNoiseLevel() Image
setExpiration() Set captcha expiration Image
setFont() Set captcha font Image
setFontSize() Set captcha font size Image
setGcFreq() Set garbage collection frequency Image
setHeight() Set captcha image height Image
setImgAlt() Image
setImgDir() Set captcha image storage directory Image
setImgUrl() Set captcha image base URL Image
setKeepSession() Sets if session should be preserved on generate() AbstractWord
setLineNoiseLevel() Image
setMessage() Sets the validation failure message template for a particular key AbstractValidator
setMessageLength() Sets the maximum allowed message length AbstractValidator
setMessages() Sets validation failure message templates given as an array, where the array keys are the message keys, and the array values are the message template strings. AbstractValidator
setName() Set name AbstractAdapter
setOption() Set single option for the object AbstractAdapter
setOptions() Sets one or multiple options AbstractValidator
setSession() Set session namespace object AbstractWord
setSessionClass() Set session class for persistence AbstractWord
setStartImage() Image
setSuffix() Set captcha image filename suffix Image
setTimeout() Set timeout for session token AbstractWord
setTranslator() Set translation object AbstractValidator
setTranslatorEnabled() Indicate whether or not translation should be enabled AbstractValidator
setTranslatorTextDomain() Set translation text domain AbstractValidator
setUseNumbers() Set if numbers should be included in the pattern AbstractWord
setValueObscured() Set flag indicating whether or not value should be obfuscated in messages AbstractValidator
setWidth() Set captcha image width Image
setWordlen() Set word length of captcha AbstractWord

Method Details

__construct()

Constructor

Parameter Name Type Description
$options array|\Traversable

Returns:

__get()

Magic function returns the value of the requested property, if and only if it is the value or a message variable.

Parameter Name Type Description
$property string

Returns: mixed

__invoke()

Invoke as command

Parameter Name Type Description
$value mixed

Returns: bool

generate()

Generate captcha

Returns: string captcha ID

getDefaultTranslator()

Get default translation object for all validate objects

Returns: \Translator\TranslatorInterface|null

getDefaultTranslatorTextDomain()

Get default translation text domain for all validate objects

Returns: string

getDotNoiseLevel()

Returns: int

getExpiration()

Get captcha expiration

Returns: int

getFont()

Get font to use when generating captcha

Returns: string

getFontSize()

Get font size

Returns: int

getGcFreq()

Get garbage collection frequency

Returns: int

getHeight()

Get captcha image height

Returns: int

getHelperName()

Get helper name used to render captcha

Returns: string

getId()

Retrieve captcha ID

Returns: string

getImgAlt()

Returns: string

getImgDir()

Get captcha image directory

Returns: string

getImgUrl()

Get captcha image base URL

Returns: string

getLineNoiseLevel()

Returns: int

getMessageLength()

Returns the maximum allowed message length

Returns: int

getMessageTemplates()

Returns the message templates from the validator

Returns: array

getMessageVariables()

Returns an array of the names of variables that are used in constructing validation failure messages

Returns: array

getMessages()

Returns array of validation failure messages

Returns: array

getName()

Get name

Returns: string

getOption()

Returns an option

Parameter Name Type Description
$option string Option

Returns: mixed Returned option

getOptions()

Returns all available options

Returns: array Array with all available options

getSession()

Get session object

Returns: \Container

getSessionClass()

Retrieve session class to utilize

Returns: string

getStartImage()

Returns: string

getSuffix()

Get captcha image file suffix

Returns: string

getTimeout()

Get session token timeout

Returns: int

getTranslator()

Return translation object

Returns: \Translator\TranslatorInterface|null

getTranslatorTextDomain()

Return the translation text domain

Returns: string

getUseNumbers()

Numbers should be included in the pattern?

Returns: bool

getWidth()

Get captcha image width

Returns: int

getWord()

Get captcha word

Returns: string

getWordlen()

Retrieve word length to use when generating captcha

Returns: int

hasDefaultTranslator()

Is there a default translation object set?

Returns: bool

hasTranslator()

Does this validator have its own specific translator?

Returns: bool

isTranslatorEnabled()

Is translation enabled?

Returns: bool

isValid()

Validate the word

Parameter Name Type Description
$value mixed
$context mixed

Returns: bool

isValueObscured()

Retrieve flag indicating whether or not value should be obfuscated in messages

Returns: bool

setDefaultTranslator()

Set default translation object for all validate objects

Parameter Name Type Description
$translator \Translator\TranslatorInterface|null
$textDomain string (optional)

Returns: void

setDefaultTranslatorTextDomain()

Set default translation text domain for all validate objects

Parameter Name Type Description
$textDomain string

Returns: void

setDotNoiseLevel()

Parameter Name Type Description
$dotNoiseLevel int

Returns: \Image Provides a fluent interface

setExpiration()

Set captcha expiration

Parameter Name Type Description
$expiration int

Returns: \Image Provides a fluent interface

setFont()

Set captcha font

Parameter Name Type Description
$font string

Returns: \Image Provides a fluent interface

setFontSize()

Set captcha font size

Parameter Name Type Description
$fsize int

Returns: \Image Provides a fluent interface

setGcFreq()

Set garbage collection frequency

Parameter Name Type Description
$gcFreq int

Returns: \Image Provides a fluent interface

setHeight()

Set captcha image height

Parameter Name Type Description
$height int

Returns: \Image Provides a fluent interface

setImgAlt()

Parameter Name Type Description
$imgAlt string

Returns: \Image Provides a fluent interface

setImgDir()

Set captcha image storage directory

Parameter Name Type Description
$imgDir string

Returns: \Image Provides a fluent interface

setImgUrl()

Set captcha image base URL

Parameter Name Type Description
$imgUrl string

Returns: \Image Provides a fluent interface

setKeepSession()

Sets if session should be preserved on generate()

Parameter Name Type Description
$keepSession bool Should

Returns: \AbstractWord Provides a fluent interface

setLineNoiseLevel()

Parameter Name Type Description
$lineNoiseLevel int

Returns: \Image Provides a fluent interface

setMessage()

Sets the validation failure message template for a particular key

Parameter Name Type Description
$messageString string
$messageKey string OPTIONAL

Returns: $this Provides a fluent interface

setMessageLength()

Sets the maximum allowed message length

Parameter Name Type Description
$length int

Returns:

setMessages()

Sets validation failure message templates given as an array, where the array keys are the message keys, and the array values are the message template strings.

Parameter Name Type Description
$messages array

Returns: $this

setName()

Set name

Parameter Name Type Description
$name string

Returns: \AbstractAdapter Provides a fluent interface

setOption()

Set single option for the object

Parameter Name Type Description
$key string
$value string

Returns: \AbstractAdapter Provides a fluent interface

setOptions()

Sets one or multiple options

Parameter Name Type Description
$options array|\Traversable Options

Returns: $this Provides fluid interface

setSession()

Set session namespace object

Parameter Name Type Description
$session \Container

Returns: \AbstractWord Provides a fluent interface

setSessionClass()

Set session class for persistence

Parameter Name Type Description
$sessionClass string

Returns: \AbstractWord Provides a fluent interface

setStartImage()

Parameter Name Type Description
$startImage string

Returns: \Image Provides a fluent interface

setSuffix()

Set captcha image filename suffix

Parameter Name Type Description
$suffix string

Returns: \Image Provides a fluent interface

setTimeout()

Set timeout for session token

Parameter Name Type Description
$ttl int

Returns: \AbstractWord Provides a fluent interface

setTranslator()

Set translation object

Parameter Name Type Description
$translator \Translator\TranslatorInterface|null
$textDomain string (optional)

Returns: $this

setTranslatorEnabled()

Indicate whether or not translation should be enabled

Parameter Name Type Description
$flag bool

Returns: $this

setTranslatorTextDomain()

Set translation text domain

Parameter Name Type Description
$textDomain string

Returns: $this

setUseNumbers()

Set if numbers should be included in the pattern

Parameter Name Type Description
$useNumbers bool numbers

Returns: \AbstractWord Provides a fluent interface

setValueObscured()

Set flag indicating whether or not value should be obfuscated in messages

Parameter Name Type Description
$flag bool

Returns: $this

setWidth()

Set captcha image width

Parameter Name Type Description
$width int

Returns: \Image Provides a fluent interface

setWordlen()

Set word length of captcha

Parameter Name Type Description
$wordlen int

Returns: \AbstractWord Provides a fluent interface

Top